home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / m2 / ModGen.lha / ModGen / Source / MGTools.def < prev    next >
Text File  |  1995-04-17  |  4KB  |  99 lines

  1. (*---------------------------------------------------------------------------
  2.   :Program.    MGTools.def
  3.   :Contents.   Modula-2 SourceCode Generator für GadgetToolsBox 2.x
  4.   :Author.     Frank Lömker
  5.   :Copyright.  FreeWare
  6.   :Language.   Modula-2
  7.   :Translator. Turbo Modula-2 V1.40
  8.   :Imports.    GadToolsBox [Jan van den Baard]
  9.   :History.    1.0 [Frank] 17-Apr-95
  10.   :History.        ModGen basiert direkt auf OG V37.11 von Thomas Igracki
  11.   :History.        und GenOberon V1.0 von Kai Bolay und Jan van den Baard.
  12.   :Bugs.       keine bekannt
  13. ---------------------------------------------------------------------------*)
  14.  
  15. DEFINITION MODULE MGTools;
  16.  
  17. FROM SYSTEM IMPORT LONGSET,ADDRESS,STRING;
  18. IMPORT G:= Graphics, d:= Dos, gtx:= GadToolsBox;
  19.  
  20. TYPE str32=ARRAY [0..31] OF CHAR;
  21.      str256=ARRAY [0..255] OF CHAR;
  22.      Pstr256=POINTER TO str256;
  23. CONST GenOpenFont  = 1;
  24.       SysFont = 2;
  25.       raster=3;
  26.       mouse=4;
  27.       port=5;
  28.       icon=6;
  29. VAR args      : RECORD
  30.                   name,baseName,       (* GUI file name, DestName *)
  31.                   screenPtr: Pstr256;  (* name for the ScreenFile *)
  32.                   openfont, sysfont,   (* Gen OpenFont ?, Use SysFont ? *)
  33.                   raster,              (* background pattern ? *)
  34.                   mouse,               (* Open window under the mouse ? *)
  35.                   port,                (* Use one IDCMPPort ? *)
  36.                   icon, nogui: LONGINT;(* Create Icons?, Open no Requester? *)
  37.                   opts: Pstr256;       (* openfont, sysfont, raster, ..? *)
  38.                 END;
  39.     source,dest,screen:str256;
  40.     file,fdef : d.FileHandlePtr;
  41.     GuiData   : gtx.GUIDATA;
  42.     MainConfig: gtx.GadToolsConfig;
  43.     Projects  : gtx.WindowList;
  44.     MConfig   : LONGSET; (*RECORD configFlags0,configFlags1: LONGSET END; *)
  45.     GetFilePresent,ListViewPresent,GetFileInWindow: BOOLEAN;
  46.  
  47. PROCEDURE FPrintF (fh: d.FileHandlePtr;format:STRING;a1: ADDRESS);
  48. PROCEDURE FPrintF2 (fh:d.FileHandlePtr;format:STRING;a2,a1: ADDRESS);
  49. PROCEDURE FPrintF3 (fh:d.FileHandlePtr;format:STRING;a3,a2,a1: ADDRESS);
  50. PROCEDURE FPrintF4 (fh:d.FileHandlePtr;format:STRING;a4,a3,a2,a1: ADDRESS);
  51. PROCEDURE FPrintF5 (fh:d.FileHandlePtr;format:STRING;a5,a4,a3,a2,a1: ADDRESS);
  52. PROCEDURE FPutS (fh: d.FileHandlePtr; str : STRING);
  53. PROCEDURE FPutS2 (str : STRING);
  54.   (* Check for the presence of GETFILE and joined LISTVIEWS.
  55.      This routine is called for each window that get's generated. *)
  56. PROCEDURE CheckItOut (pw: gtx.ProjectWindowPtr);
  57.   (* Check for the presence of GETFILE at all *)
  58. PROCEDURE CheckGetFile;
  59.   (* Write DisplayID flags. *)
  60. PROCEDURE WriteIDFlags (flags: LONGSET);
  61.   (* Write the IntuiText drawmode flags. *)
  62. PROCEDURE WriteDrMd (drmd: SHORTSET);
  63.   (* Write the NewMenu structures. *)
  64. PROCEDURE WriteMenus (end:BOOLEAN);
  65.   (* Write the GadgetID defines. *)
  66. PROCEDURE WriteID ();
  67.   (* Check FOR OpenFont source genertion. *)
  68. PROCEDURE CheckFont(): BOOLEAN;
  69.   (* Init the Windowcoordinates. *)
  70. PROCEDURE InitCoords;
  71.   (* Write the necessary globals. *)
  72. PROCEDURE WriteGlob (scr,win:BOOLEAN);
  73.   (* Write the Cycle and Mx lables. *)
  74. PROCEDURE WriteLabels (end:BOOLEAN);
  75. PROCEDURE WriteList();
  76.   (* Write a ListView List/Node initialisation *)
  77. PROCEDURE WriteNodes (pw: gtx.ProjectWindowPtr; pnum: INTEGER);
  78.   (* Write the TextAttr structure *)
  79. PROCEDURE WriteTextAttr (scr,end:BOOLEAN);
  80.   (* Write the Window Tags. *)
  81. PROCEDURE WriteWindow (pw: gtx.ProjectWindowPtr);
  82.   (* Write the Screen Tags and screen specific data. *)
  83. PROCEDURE WriteSTags (end:BOOLEAN);
  84.   (* Write the Modula IntuiText structures. *)
  85. PROCEDURE WriteIText();
  86.   (* Write the NewGadget arrays. *)
  87. PROCEDURE WriteGArray (end:BOOLEAN);
  88. PROCEDURE WriteGadHeader (pw: gtx.ProjectWindowPtr);
  89.   (* Write the routine header. *)
  90. PROCEDURE WriteHeader (pw: gtx.ProjectWindowPtr);
  91.   (* Write the gadget type array. *)
  92. PROCEDURE WriteGTypes (end:BOOLEAN);
  93.   (* Write the gadget tagitem array. *)
  94. PROCEDURE WriteGTags (end:BOOLEAN);
  95.   (* Write the Modula Gadgets initialization. *)
  96. PROCEDURE WriteGadgets (pw: gtx.ProjectWindowPtr);
  97.  
  98. END MGTools.
  99.